
"===================="
"   vim-key setting  "
"===================="
nmap :erc e ~/.config/nvim/init.vim
nmap ; :
nmap H ^
nmap L $
" source my vimrc
nmap R :source<LEADER>$MYVIMRC<CR>
" leader map
let mapleader=' '  " set leader is ; key
let g:maplocalleader=';'  " set localleader is ; key
"cursor
nmap J 5j
nmap K 5k
" window
nmap sh :set nosplitright<CR>:vsplit<CR>
nmap sj :set splitbelow<CR>:split<CR> 
nmap sk :set nosplitbelow<CR>:split<CR>
nmap sl :set splitright<CR>:vsplit<CR>
" window move key to config
nmap <SPACE>h <C-W>h
nmap <SPACE>j <C-W>j
nmap <SPACE>k <C-W>k
nmap <SPACE>l <C-W>l
" windows size 
nmap <Up> :res +2<CR>
nmap <down> :res -2<CR>
nmap <left> :vertical resize-5<CR>
nmap <right> :vertical resize+5<CR>

" Tab key config
nmap tn :tabe<CR>  "new a table
"search word key config
nmap = n
nmap - N
" file operation key to config
nmap S :w!<CR>
nmap Q :q!<CR>
" open the init.vim(vimrc) file any times
nmap <SPACE>rc :tabe<CR>e ~/.config/nvim/init.vim<CR>
vmap Y "+y   "set Y copy text to system shear plate
" file search
nmap <SPACE><CR> :nohlsearch<CR>
" Markdown
" markdown snippets
source ~/.config/nvim/config/markdown.vim
autocmd FileType markdown set spell
" auto spell
